package com.etc.dao;

import com.etc.pojo.Favorite;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface FavoriteOfDao {

    /**
     * 插入收藏记录
     * @param favorite
     */
    public int insertFavorite(Favorite favorite);

    /**
     * 根据用户编号和视频编号查询收藏记录
     * @param userId
     * @param videoId
     * @return
     */
    public Favorite queryFavoriteByVideoIdAndUserId(@Param("userId") String userId, @Param("videoId") int videoId);

    /**
     * 根据用户编号和视频编号删除收藏记录
     * @param userId
     * @param videoId
     * @return
     */
    public int deleteFavoriteByVideoIdAndUserId(@Param("userId") String userId, @Param("videoId") int videoId);



}
